<template>
  <div>
    <!-- 第一栏 -->
    <el-card style="width: 1191px; height: 150px">
      <el-form :inline="true" :model="formInline">
        <el-form-item label="学科编号">
          <el-input v-model="formInline.user" />
        </el-form-item>

        <el-form-item label="学科名称">
          <el-input v-model="formInline.number" />
        </el-form-item>

        <el-form-item label="创建者">
          <el-input v-model="formInline.creator" />
        </el-form-item>

        <el-form-item label="状态">
          <el-select v-model="formInline.region" placeholder="请选择">
            <el-option label="禁用" value="shanghai"></el-option>
            <el-option label="启用" value="beijing"></el-option>
          </el-select>
        </el-form-item>

        <div>
          <el-button type="primary">搜索</el-button>
          <el-button>清除</el-button>
          <el-button type="primary" @click="dialogFormVisible = true"
            >+新增学科</el-button
          >
        </div>
      </el-form>
    </el-card>

    <!-- 弹出框 -->
    <!-- <el-dialog title="新增学科" :visible.sync="dialogFormVisible">
      <el-form :model="form">
        <el-form-item label="学科编号" :label-width="formLabelWidth">
          <el-input v-model="form.name" autocomplete="off"></el-input>
        </el-form-item>

        <el-form-item label="学科名称" :label-width="formLabelWidth">
          <el-input v-model="form.second" autocomplete="off"></el-input>
        </el-form-item>

        <el-form-item label="学科简称" :label-width="formLabelWidth">
          <el-input v-model="form.third" autocomplete="off"></el-input>
        </el-form-item>

        <el-form-item label="学科简介" :label-width="formLabelWidth">
          <el-input v-model="form.fourth" autocomplete="off"></el-input>
        </el-form-item>

        <el-form-item label="学科备注" :label-width="formLabelWidth">
          <el-input v-model="form.fifth" autocomplete="off"></el-input>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogFormVisible = false">取 消</el-button>
        <el-button type="primary" @click="dialogFormVisible = false"
          >确 定</el-button
        >
      </div>
    </el-dialog> -->
    <el-dialog
      style="text-align: center"
      title="新增学科"
      width="600px"
      :visible.sync="dialogFormVisible"
    >
      <el-form label-width="100px">
        <el-form-item label="学科编号">
          <el-input v-model="form.name" autocomplete="off" />
        </el-form-item>
      </el-form>

      <el-form label-width="100px">
        <el-form-item label="学科名称">
          <el-input v-model="form.second" autocomplete="off" />
        </el-form-item>
      </el-form>

      <el-form label-width="100px">
        <el-form-item label="学科简称">
          <el-input v-model="form.third" autocomplete="off" />
        </el-form-item>
      </el-form>

      <el-form label-width="100px">
        <el-form-item label="学科简介">
          <el-input v-model="form.fourth" autocomplete="off" />
        </el-form-item>
      </el-form>

      <el-form label-width="100px">
        <el-form-item label="学科备注">
          <el-input v-model="form.fifth" autocomplete="off" />
        </el-form-item>
      </el-form>

      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogFormVisible = false">取 消</el-button>
        <el-button type="primary" @click="dialogFormVisible = false"
          >确 定</el-button
        >
      </div>
    </el-dialog>

    <!-- 第二栏 -->
    <el-card style="width: 1191px; height: 283px">
      <el-table :data="tableData" style="width: 100%; margin-bottom: 44px">
        <el-table-column prop="date" label="序号" width="180">
        </el-table-column>
        <el-table-column prop="name" label="学科编号" width="180">
        </el-table-column>
        <el-table-column prop="Course" label="学科名称"> </el-table-column>
        <el-table-column prop="Referred" label="简称"> </el-table-column>
        <el-table-column prop="creator" label="创建者"> </el-table-column>
        <el-table-column prop="Creation" label="创建日期"> </el-table-column>
        <el-table-column prop="state" label="状态"> </el-table-column>
        <!-- <el-table-column prop="operation" label="操作"> </el-table-column> -->
        <template>
          <el-table-column label="操作">
            <!-- <span style="color: #409eff; margin-left: 5px">编辑</span> -->
            <!-- <span style="color: #409eff; margin-left: 5px">禁用</span> -->
            <!-- <span style="color: #409eff; margin-left: 5px">删除</span> -->
            <a
              style="cursor: pointer; color: #409eff; margin-left: 5px"
              οnclick=""
              >编辑</a
            >
            <a
              style="cursor: pointer; color: #409eff; margin-left: 5px"
              οnclick=""
              >禁用
            </a>
            <a
              style="cursor: pointer; color: #409eff; margin-left: 5px"
              οnclick=""
              >删除
            </a>
          </el-table-column>
        </template>
      </el-table>

      <!-- 第三栏 -->
      <div class="block" style="text-align: center">
        <el-pagination
          :current-page="currentPage4"
          :page-sizes="[100, 200, 300, 400]"
          :page-size="100"
          layout="total, sizes, prev, pager, next, jumper"
          :total="400"
        >
        </el-pagination>
      </div>
    </el-card>
  </div>
</template>

<script>
export default {
  data () {
    return {
      // 第一栏
      formInline: {
        user: '',
        number: '',
        creator: '',
        region: ''
      },
      // 第二栏
      tableData: [
        {
          date: '1',
          name: 'QD001',
          Course: '前端与移动开发',
          Referred: '前端',
          creator: '刘洋洋',
          Creation: '2019-11-21',
          state: '启动'
        },
        {
          date: '2',
          name: 'QD001',
          Course: 'java',
          Referred: '后端',
          creator: '北冰洋',
          Creation: '2019-11-21',
          state: '禁用'
        }
      ],
      currentPage4: 4,
      //   弹出框
      dialogTableVisible: false,
      dialogFormVisible: false,
      form: {
        name: '',
        second: '',
        third: '',
        fourth: '',
        fifth: ''
      },
      formLabelWidth: '50px'
    }
  },
  methods: {}
}
</script>

<style lang="less">
.dialog-footer {
  text-align: center;
}
.el-dialog__header {
  background-color: #66b1ff;
}
</style>
